package ${map.package}.${map.module}.controller;

import com.yao.common.resp.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import ${map.package}.${map.preTable}.entity.dto.${map.module?cap_first}Dto;
import ${map.package}.${map.preTable}.service.${map.module?cap_first}Service;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import com.yao.common.resp.ApiResponse;

/**
* ${tableComment} Controller
*
* @author autoCode
* @version 1.0.0-SNAPSHOT
* @date ${.now?string("yyyy-MM-dd")}
*/
@Api(tags="${api.tag}")
@RestController
@RequestMapping(value="/${map.module?uncap_first}")
@Slf4j
public class ${map.module?cap_first}Controller {


@Autowired
private ${map.module?cap_first}Service ${map.module?uncap_first}Service;

@ApiOperation(value = "新增${api.apiOperationValue}",notes = "新增${api.apiOperationValue}")
@RequestMapping(value="/add", method=RequestMethod.POST)
public ApiResponse
<Object> add(@RequestBody ${map.module?cap_first}Dto model){
    return ApiResponse.success();
    }

    @ApiOperation(value = "修改${api.apiOperationValue}",notes = "修改${api.apiOperationValue}")
    @RequestMapping(value="/update", method=RequestMethod.POST)
    public ApiResponse
    <Object> update(@RequestBody ${map.module?cap_first}Dto model){
        return ApiResponse.success();
        }

        @ApiOperation(value = "删除${api.apiOperationValue}",notes = "逻辑删除${api.apiOperationValue}")
        @RequestMapping(value="/delete/{id}", method=RequestMethod.GET)
        public ApiResponse
        <Object> deleteById(@PathVariable("id") Integer id){
            return ApiResponse.success();
            }

            }